package com.seaside.park.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.seaside.common.bean.Result;
import com.seaside.park.bean.ParkingPlaceDeal;
import com.seaside.park.mapper.ParkingPlaceDealMapper;
import com.seaside.parkCommon.bean.Alarm;
import com.seaside.parkCommon.bean.AlarmOperate;
import com.seaside.parkCommon.bean.User;
import com.seaside.parkCommon.mapper.AlarmOperateMapper;
import com.seaside.parkCommon.mapper.UserMapper;
import com.seaside.parkCommon.service.AlarmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

@Api(tags="车位交易")
@RestController
@RequestMapping("/api/parking-place-deal")
public class ParkingPlaceDealAPI {

    @Autowired
    private ParkingPlaceDealMapper parkingPlaceDealMapper;

    @ApiOperation(value = "车位交易列表", response = Result.class)
    @ApiImplicitParams({})
    @PostMapping("/list")
    public Result<IPage<Alarm>> list() {

        List<ParkingPlaceDeal> parkingPlaceDeals = parkingPlaceDealMapper.selectList(new QueryWrapper<>());
        return Result.OK("查询成功", parkingPlaceDeals);
    }
}
